package video_service

import (
	"context"
	"fmt"
	ark "github.com/sashabaranov/go-openai"
	"os"
)

func main() {
	//text := ""

	config := ark.DefaultConfig(os.Getenv("ARK_API_KEY"))
	config.BaseURL = "https://ark.cn-beijing.volces.com/api/v3"
	client := ark.NewClientWithConfig(config)

	fmt.Println("----- standard request -----")
	resp, err := client.CreateChatCompletion(
		context.Background(),
		ark.ChatCompletionRequest{
			Model: "doubao-1-5-vision-pro-32k-250115",
			Messages: []ark.ChatCompletionMessage{
				{
					Role:    ark.ChatMessageRoleSystem,
					Content: "你现在的角色是一名教师助理，请根据老师的课堂讲义进行知识点总结归纳，越详细越好。并标记出关键知识点的位置，例如：02:23:31",
				},
				{
					Role:    ark.ChatMessageRoleUser,
					Content: "text",
				},
			},
		},
	)
	if err != nil {
		fmt.Printf("ChatCompletion error: %v\n", err)
		return
	}
	//fmt.Println(resp.Choices[0].Message.Content)
	fmt.Println(resp)

}
